Skip to content

feat(indexer): message replay puts messages back in the worker queue - #1637

Open
carte7000 wants to merge 1 commit into
feat/indexer/replica/claim-workfrom
feat/indexer/replica/replay-cli
Open

carte7000 wants to merge 1 commit into
feat/indexer/replica/claim-workfrom
feat/indexer/replica/replay-cli

Conversation

@carte7000

Copy link
Copy Markdown
Contributor

indexer-replay messages now sets each message that is not SUCCESS back to PROCESSING with a new deadline of now plus the visibility window. The live workers fetch the missing verifications, retry with backoff and set the final status. A message that is SUCCESS is not changed.

A PROCESSING message keeps its lease and claim token, and only its deadline changes. A TIMEOUT message gets a new claim token, so an old claim cannot settle it.

With --force, the replay first overwrites the stored verifications from all configured verifiers, then requeues the message. The replay engine needs WithRetryWindow for message replays.

@carte7000
carte7000 added this pull request to stack #1633 November 23, 2026 19:45
@carte7000
carte7000 force-pushed the feat/indexer/replica/replay-cli branch from ca42c8f to c081581 Compare November 23, 2026 19:53
@carte7000
carte7000 force-pushed the feat/indexer/replica/replay-cli branch from c081581 to eaaa24d Compare November 23, 2026 20:00
@carte7000
carte7000 force-pushed the feat/indexer/replica/replay-cli branch from eaaa24d to 53ae597 Compare November 23, 2026 20:38
@carte7000
carte7000 marked this pull request as ready for review November 23, 2026 20:56
@carte7000
carte7000 requested review from a team as code owners November 23, 2026 20:56
tt-cll
tt-cll previously approved these changes Nov 23, 2026
indexer-replay messages now sets each message that is not SUCCESS back
to PROCESSING with a new deadline of now plus the visibility window.
The live workers fetch the missing verifications, retry with backoff
and set the final status. A message that is SUCCESS is not changed.

A PROCESSING message keeps its lease and claim token, and only its
deadline changes. A TIMEOUT message gets a new claim token, so an old
claim cannot settle it.

With --force, the replay first overwrites the stored verifications from
all configured verifiers, then requeues the message. The replay engine
needs WithRetryWindow for message replays.
@carte7000
carte7000 force-pushed the feat/indexer/replica/replay-cli branch from 67fe67a to f8550d2 Compare November 24, 2026 19:41
@github-actions

Copy link
Copy Markdown
Contributor

Code coverage report:

Package main feat/indexer/replica/replay-cli Diff
github.com/smartcontractkit/chainlink-ccv/aggregator 46.21% 46.20% -0.01%
github.com/smartcontractkit/chainlink-ccv/bootstrap 67.91% 67.91% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 53.78% 53.78% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 52.74% 52.74% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 47.59% 47.59% +0.00%
github.com/smartcontractkit/chainlink-ccv/docs 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 44.92% 44.92% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 33.37% 34.02% +0.65%
github.com/smartcontractkit/chainlink-ccv/integration 70.90% 70.90% +0.00%
github.com/smartcontractkit/chainlink-ccv/internal 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/migration 78.70% 78.70% +0.00%
github.com/smartcontractkit/chainlink-ccv/pkg 84.62% 84.62% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 18.67% 18.67% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 61.72% 61.72% +0.00%
github.com/smartcontractkit/chainlink-ccv/tools 50.86% 53.56% +2.70%
github.com/smartcontractkit/chainlink-ccv/verifier 45.22% 45.22% +0.00%
Total 48.70% 48.70% +0.00%

Files removed (from main):

  • github.com/smartcontractkit/chainlink-ccv/indexer/pkg/worker/heap.go
  • github.com/smartcontractkit/chainlink-ccv/indexer/pkg/worker/scheduler.go

Files added (in feat/indexer/replica/replay-cli):

  • github.com/smartcontractkit/chainlink-ccv/indexer/pkg/storage/work_state.go

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants